package com.bean;

import java.io.Serializable;

/**
 * 订单详情
 */
public class Detail implements Serializable {
    private Integer id;
    private Integer orderId;
    private Integer commodityId;
    private Integer number;
    private Double total;

    private Commodity commodity;

    public Detail() {
    }

    public Detail(Integer id) {
        this.id = id;
    }

    public Detail(Integer orderId, Integer commodityId, Integer number, Double total) {
        this.orderId = orderId;
        this.commodityId = commodityId;
        this.number = number;
        this.total = total;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Integer getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(Integer commodityId) {
        this.commodityId = commodityId;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Double getTotal() {
        return total;
    }

    public void setTotal(Double total) {
        this.total = total;
    }

    public Commodity getCommodity() {
        return commodity;
    }

    public void setCommodity(Commodity commodity) {
        this.commodity = commodity;
    }

    @Override
    public String toString() {
        return "Detail{" +
                "id=" + id +
                ", orderId=" + orderId +
                ", commodityId=" + commodityId +
                ", number=" + number +
                ", total=" + total +
                ", commodity=" + commodity +
                '}';
    }
}
